import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import http from "common/http.js"
import util from "common/util.js"
import store from "store/store.js"
import diyGoods from "@/components/diy-goods/diy-goods.vue"
import diyTabbar from "@/components/diy-tabbar/diy-tabbar.vue"
import diyScorll from "@/components/diy-scroll/diy-scroll.vue"
import diyLoginTips from "@/components/diy-login-tips/diyLoginTips.vue"

let list = [{  
	name:'diyGoods',
	component:diyGoods
},{
	name:'diyTabbar',
	component:diyTabbar
},{
	name:'diyScorll',
	component:diyScorll
},{
	name:'diyLoginTips',
	component:diyLoginTips
},]

Vue.component('diyGoods',diyGoods)
Vue.component('diyTabbar',diyTabbar)
Vue.component('diyScorll',diyScorll)
Vue.component('diyLoginTips',diyLoginTips)

// list.forEach((item)=>{
// 	Vue.component(item.name,item.component)
// })

Vue.prototype.$http = http;
Vue.prototype.$util = util;
Vue.prototype.$store = store;
Vue.config.productionTip = false
App.mpType = 'app'
// main.js
import uView from "uview-ui";
Vue.use(uView);
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif